﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BBICMS.Model
{
    using Core;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    public partial class Advertisement : AuditableEntity<int>
    {
    
        public int PositionId { get; set; }
        [Display(Name = "主题")]
        public string Title { get; set; }
        [Display(Name = "缩略图")]
        public string SmallImgUrl { get; set; }
        [Display(Name = "显示图")]
        public string FullImgUrl { get; set; }
        [Display(Name = "排序")]
        public int Importance { get; set; }
        [Display(Name = "链接")]
        public string WebLink { get; set; }
         [Display(Name = "描述")]
        public string Description { get; set; }
        public bool Active { get; set; }
      

         [Display(Name = "广告位")]
        public virtual Position Position { get; set; }

        public string PositionTitle
        {
            get
            {
                if (this.Position != null)
                {
                    return this.Position.Title;
                }
                return string.Empty;
            }
        }
    }
}
